package libra;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;

/**
 * SpringBoot启动入口 
 * @author libra
 */
//标注该类为SpringBoot的主配置类
@SpringBootApplication
//指定包扫描
@ComponentScan(value={"libra","libraServer"})
public class MainStart_SentinelCore_30900 {
	public static void main(String[] args) {
		System.out.println("MainStart.main()");
		ConfigurableApplicationContext cac = SpringApplication.run(MainStart_SentinelCore_30900.class, args);
	}
	
	/**
	 * 结合sentinel-annotation-aspectj依赖
	 * 配合@SentinelResource注解使用，在容器中必须配置该bean对象 
	 */
	@Bean
	public SentinelResourceAspect sentinelResourceAspect() {
		return new SentinelResourceAspect();
	}
}